package com.emergency.engine.domain;

import com.emergency.base.domain.BaseEntity;
import com.emergency.base.domain.Frames;
import com.emergency.base.domain.Scenar;
import javax.persistence.*;
import java.io.Serializable;


/**
 * Created by asus on 2020/3/13.
 */
@Entity
@Table(name="bus_scenar_part")
public class ScenarPart extends BaseEntity{

    /**想定*/
    @OneToOne(targetEntity=Scenar.class,fetch= FetchType.EAGER)
    @JoinColumn(name="scenar_id",referencedColumnName="id")
    private Scenar scenar;

    /**片段*/
    @OneToOne(targetEntity=Frames.class,fetch= FetchType.EAGER)
    @JoinColumn(name="frames_id",referencedColumnName="id")
    private Frames frames;

    /**片段开始时间*/
    private long startTime;

    /**片段类型*/
    private int type;

    /**片段结束时间*/
    private long endTime;

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public Scenar getScenar() {        return scenar;    }

    public void setScenar(Scenar scenar) { this.scenar = scenar;}

    public Frames getFrames() {
        return frames;
    }

    public void setFrames(Frames frames) {
        this.frames = frames;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
